<template>
	<view>
		<view class="rich">
			<rich-text :nodes="info.content"></rich-text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:''
			}
		},
		onLoad(p) {
			this.getDetail(p.id);
		},
		methods: {
			getDetail(id){
				this.$show();
				this.$http.post('index/article',{
					id:id
				}).then((res)=>{
					this.$hide()
					this.info = res.data.article;
					uni.setNavigationBarTitle({
						title: res.data.article.title
					});
				})
			},
		}
	}
</script>

<style>
.title{
	padding: 20upx;
	font-size: 32upx;
	font-weight: bold;
	margin-bottom: 30upx;
	text-align: center;
}
.rich{
	padding: 20upx;
}
</style>
